package cate.game.client.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.role.Role;

public abstract class MsgInputTemplate implements MsgInput {

    @Override
    public void execute(final GameBody game, ClientContext cc) {
        final Role role = cc.getRole();
        perform(game, role, () -> {
            action(game, role);
        });
    }

    public abstract void action(GameBody game, Role role) throws Exception;

}
